<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/work_today.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_client_tracking.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>
<script src="${staticServer}/inc/js/infopad.js?2.2"></script>
<script src="${staticServer}/inc/js/tips.js"></script>
<script src="${staticServer}/js/web/consultant_client_tracking_list.js?1.0"></script>

<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<script src="${staticServer}/inc/js/datepicker.js"></script>

<script>
var contextPath='${contextPath}';

$(function(){
    $("#center").val(${center});
	$("#stu_type").val(${stu_type});
    $("#stu_name").val(${stu_name});
    $("#state").val(${state});
    $("#nickname1").val(${nickname1});
});

function submit(status){
	if (status==1 ){
        window.location.href="${contextPath}/index/enrollmentRecord.htm?status="+status+"&center="+$("#center").val()+"&stu_name="+$("#stu_name").val()+"&state="+$("#state").val()+"&stu_type="+$("#stu_type").val()+"&nickname1="+$("#nickname1").val()+"&startTime="+$("#startTime").val()+"&endTime="+$("#endTime").val();
    }/*else if (status==2){
        $.post('${contextPath}/index/enrollmentSingular.json',{
        startTime:$("#startTime").val(),
		endTime:$("#endTime").val()
        },function(data){

           if(data){
                if(data.name!=null){
                    window.location.href = "http://www.yueqiao.org/mydata/uploadtea/xls/" + data.name;
                }
            }
        });
	}else if (status==3){
        $.post('${contextPath}/index/flowInformation.json',{
            startTime:$("#startTime").val(),
            endTime:$("#endTime").val()
        },function(data){

            if(data){
                if(data.name!=null){
                    window.location.href = "http://www.yueqiao.org/mydata/uploadtea/xls/" + data.name;
                }
            }
        });

	}*/
	else {
        window.location.href="${contextPath}/index/enrollmentRecord.htm?center="+$("#center").val()+"&stu_name="+$("#stu_name").val()+"&state="+$("#state").val()+"&stu_type="+$("#stu_type").val()+"&nickname1="+$("#nickname1").val()+"&startTime="+$("#startTime").val()+"&endTime="+$("#endTime").val();

    }
}



</script>
</head>

<body>
<input type="hidden" id="traId" value="">
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>财务管理</li>
			<li>&gt;</li>
			<li class="current">招生记录列表</li>
		</ul>
	</div>
	<div id="container">
		<div id="title">招生记录列表</div>
		<table class="simple_table" rel="nohover" style="min-width: 750px;">
			<tr>
			
				<td>
				<#if webutil.getCookieUser().username=="system">
				<label for="phone">中心地址：</label> 
				<select id="center">
					<option value="">全部</option>
					<#if offList??>
					<#list offList as list>
						<option value="${list.keyname}">${list.name}</option>
					</#list>
					</#if>
				<select>
				 </#if>
				
				<label for="phone">审核状态：</label> 
				<select id="state">
					<option value="">全部</option>
					<option value="0">未审核</option>
					<option value="1">未通过</option>
					<option value="2">已审核</option>
				</select>
                    <label for="">学员类型：</label>
                    <select id="stu_type">
                        <option value="1">新增学员</option>
                        <option value="2">续费学员</option>
                        <option value="3">家庭学员</option>
                        <option value="4">上门费</option>
                         <option value="5">培优班（在读）</option>
                    </select>
				<label for="phone">学生姓名：</label> 
				<input type="text" value="" id="stu_name" />
				
				<label for="phone">老师姓名：</label> 
				<input type="text" value="" id="nickname1" />
				
				<br/>
				<label for="phone">开始时间：</label>
				<input type="text" id="startTime" rel="DATE::Y-m-d" value="${startTime}" size="15" maxlength="15" readonly="readonly" class="DatePicker_Icon">
				<label for="phone">结束时间：</label>
				<input type="text" id="endTime" rel="DATE::Y-m-d" value="${endTime}" size="15" maxlength="15" readonly="readonly" class="DatePicker_Icon">
               	</td>
              	<td >
              	<input type="button" value=" 查 询 " onclick="submit()" /></td>
				<td><input type="button" value=" 下 载 " onclick="submit(1)" /></td></td>
				<#--<td><input type="button" value=" 未成单数下载" onclick="submit(2)" title="" /></td></td>
				<td><input type="button" value=" 流水信息下载" onclick="submit(3)" title="" /></td></td>-->
			</tr>
		</table>
		<table>
			<tr class="fields">
				<th width="3%"></th>
                <th width="100">交款中心</th>
                <th width="100">定金日期</th>
                <th width="100">交款时间</th>
                <th width="70">收款金额</th>
                <th width="70">缴费类型</th>
				<th width="70">学员姓名</th>
                <th width="100">课程类型</th>
                <th width="70">接待老师</th>
				<th width="70">来源</th>
                <th width="50">状态</th>
				<th width="50">操作</th>
			</tr>
			
			<#if list??>
				<#list list as list>
				<tbody id="datas">
					<tr class="even_row">
						<td align="center"><input name="" type="checkbox" value="${list.id}"></td>
                        <td align="center">${list.center}</td>
                        <td align="center">${list.depositDate}</td>
                        <td align="center"><#if list.moneyDate??>${list.moneyDate?date}</#if></td>
                        <td align="center">
							<#if list.met_name?? && list.met_name!="">
								<#if list.met_name=="POS刷卡" || list.met_name=="POS刷卡（备用）" || list.met_name?contains("POS刷卡（备用")>
									<#if list.moneys??>
										<#if list.moneys gt 4487 >
											<#if list.center??>
												<#if list.center=="杭州景芳中心" || list.center=="南京雨花台中心" || list.center=="北京上地中心" || list.center=="天津小白楼中心" || list.center=="重庆南坪中心">
												${list.moneys-30}
												<#else>
												${list.moneys-35}
												</#if>
											<#else>
											${list.moneys-35}
											</#if>
										<#else>
										${list.moneys-list.moneys*0.0078}
										</#if>
									</#if>
								<#else>
								${list.moneys}
								</#if>
							</#if>

                            <br/>(${list.moneys})
                        </td>
                        <td align="center">
							<#if list.moneyType2=="1">
                                定金
							<#elseif list.moneyType2=="2">
                                部分款
							<#elseif list.moneyType2=="3">
                                全款
							<#elseif list.moneyType2=="4">
                                尾款
							</#if>
                        </td>
                        <td align="center"><#if list.stu_id?? && list.stu_id!=0>${list.stu_name}<#else>${list.student}</#if></td>

                        <td align="center">
							<#if list.pra_type=="1">
                                非脑电
							<#elseif list.pra_type=="2">
                                普通中心
							<#elseif list.pra_type=="3">
                                全脑
							<#elseif list.pra_type=="4">
                                太优
							<#elseif list.pra_type=="5">
                                家庭训练
							<#elseif list.pra_type=="6">
                                夏令营
							<#elseif list.pra_type=="7">
                                上门费
							</#if>
							<#if list.pra_type!="6">
							${list.times}<#if list.pra_type=="5">月<#else>次</#if>
							</#if>
                        </td>

                        <td align="center">${list.nickname1}<br/>${list.nickname2}<br/>${list.record_teacher}</td>
                        <td align="center">${list.sourceName}</td>

						<td align="center"><#if list.state=="0">未审核<#elseif list.state=="1">未通过<#elseif list.state=="2">已通过</#if></td>
						<td align="center">
						<#if webutil.getCookieUser().username=="system" || webutil.getCookieUser().username=="zhangxiaoqian">
							<a href="${contextPath}/index/moenysDetail.htm?id=${list.id}">查看</a>
						<#else>
							<#if webutil.getCookieUser().username=="${list.username}" || webutil.getCookieUser().username=="${list.jd_username1}" || webutil.getCookieUser().username=="${list.jd_username2}">
								<#if list.state=="2">
									<a href="">已成交</a>
								<#else>
									<a href="${contextPath}/index/addMoenys.htm?id=${list.id}">编辑</a>
								</#if>
							<#else>
								<a href="${contextPath}/index/moenysDetail.htm?id=${list.id}">查看</a>
							</#if>
						</#if>
						</td>
					</tr>
				</#list>
			</#if>
		</table>
	</div>
	
	<div id="pager">
	<ul id="pagination" style="padding-left: 14px">
		<#if page??>
		<#if page.pagetotal?? && page.pagetotal!="0">
	<#assign pagetotal = page.pagetotal>
	<#else>
	<#assign pagetotal = 1>
	</#if>
			<#if page.currpage??>
	<#assign currpage = page.currpage>
	<#else>
	<#assign currpage = 1>
	</#if>
				<#if currpage==1 >
					<li class="previous-off">首页</li>
					<li class="previous-off">上一页</li>
					<#else>
					<li class="previous"><a href="${contextPath}/index/enrollmentRecord.htm?currPage=1&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">首页</a></li>
					<li class="previous"><a href="${contextPath}/index/enrollmentRecord.htm?currPage=${currpage-1}&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">上一页</a></li>
					</#if>
					<input type="hidden" id="total" value="${page.pagetotal}" />	
		<#if pagetotal<=11>
			<#list 1..pagetotal as index_up>  
	           <#if currpage==index_up > 
	           		<li class="current">${index_up}</li>
	           <#else>
	           		<li><a href="${contextPath}/index/enrollmentRecord.htm?currPage=${index_up}&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">${index_up}</a></li>
	           </#if>  
			</#list>  
		<#else>
			<#if currpage<=8 >
				<#list 1..9 as index_up>  
	           	<#if currpage==index_up >  
	            	<li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/enrollmentRecord.htm?currPage=${index_up}&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">${index_up}</a></li>
	           	</#if>
	           	</#list>  
	           	<li>...</li>
	           	<li><a href="${contextPath}/index/enrollmentRecord.htm?currPage=${pagetotal}&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">${pagetotal}</a></li>
				
			<#elseif (currpage>= 9 && currpage<pagetotal-7)  >	
				<li><a href="${contextPath}/index/enrollmentRecord.htm?currPage=1&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">1</a></li>
				<li>...</li>
				<#list currpage-3..currpage+3 as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/enrollmentRecord.htm?currPage=${index_up}&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">${index_up}</a></li>
	           	</#if>
	           	</#list>
				<li>...</li>
	           	<li><a href="${contextPath}/index/enrollmentRecord.htm?currPage=${pagetotal}&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">${pagetotal}</a></li>
			<#else>
				<li><a href="${contextPath}/index/enrollmentRecord.htm?currPage=1&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">1</a></li>
				<li>...</li>
				<#list pagetotal-8..pagetotal as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/enrollmentRecord.htm?currPage=${index_up}&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">${index_up}</a></li>
	           	</#if>
				</#list>  
			</#if>
		</#if> 
		<#if currpage==pagetotal >
		 	<li class="previous-off">下一页</li>
		 	<li class="previous-off">尾页</li>
		<#else>
			<li class="previous"><a href="${contextPath}/index/enrollmentRecord.htm?currPage=${currpage+1}&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">下一页</a></li>
			<li class="previous"><a href="${contextPath}/index/enrollmentRecord.htm?currPage=${page.pagetotal}&startTime=${startTime}&endTime=${endTime}&state=${state}&stu_name=${stu_name}&stu_type=${stu_type}">尾页</a></li>
		</#if>
		<li class="previous"></li>
		<li class="pageinfo">共${page.total}条记录</li>
	</#if>
	</ul>
	</div>
	
	<div class="emptyline"></div>
</body>
</html>